<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.container .panel{
	margin-top:120px;
}
</style>
<title>用户注册</title>
</head>
<body>
	<div class="container">
		<div class="panel panel-default col-md-offset-3 col-md-6 ">
			<div class="h2 text-center">用户注册</div>
			<div class="pannel-body">
				<form class="form-horizontal" action="./Muform" method="post"
				enctype="multipart/form-data">       <!-- 和java中.1相同路径 -->
					<div class="form-group">
						<label class="control-label col-md-4">用户名</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="uname" placeholder="Username"/>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-4">密码</label>
						<div class="col-md-8">
							<input type="password" class="form-control" name="pwd" placeholder="Password"/>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-4">重新输入密码</label>
						<div class="col-md-8">
							<input type="password" class="form-control" placeholder="Password"/>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-4">性别</label>
						<div class="col-md-8">
							<label class="radio-inline">
								<input type="radio" name="sex" value="M">男
							</label>
							<label class="radio-inline">
								<input type="radio" name="sex" value="N">女
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-md-4">上传图片</label>
						<div class="col-md-4">
							<input type="file" name="file" class="form-control" id="imageuploader">
						</div>
					</div>
					<div class="control-label col-md-4">
						<img alt="预览图片" id="previewer" height="180" width="160"/>
					</div>
					<div class="form-group col-md-12">
						<label class="control-label col-md-4">兴趣爱好</label>
						
						<select multiple name="interests" class="col-md-4">
							<option value="books">看书</option>
							<option value="balls">打球</option>
							<option value="music">音乐</option>
						</select>
						
					</div>
					<div class="form-group">
						<div class="col-md-offset-4 col-md-4">
							<button type="submit" class="btn btn-primary btn-block">提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script type="text/javascript">
 		var imageuploader = document.getElementById('imageuploader');
 		var previewer = document.getElementById('previewer');
 		imageuploader.onchange = function() {
 			var selectedFile = this.files[0];
 			var reader = new FileReader();
 			reader.onload = function() {
 				previewer.src = reader.result;
 			}
 			reader.readAsDataURL(selectedFile);
 		}
	</script>
</body>
</html>